import { arrayToJson } from '@/common/js/util.js'

// 发送类型
export const actionType = function(json = false) {
    const actionList = [         
        { name: "员工群发", id: 1 },
        { name: "员工应用消息", id: 2 }
    ]
    if (json) {
        return arrayToJson(actionList, "id")
    }
    return actionList
}

// 任务卡类型
export const classType = function(json = false) {
    const classList = [        
        { name: "文本消息", id: "1" },
        { name: "任务卡片", id: "2" },
        { name: "图文消息", id: "3" },
        { name: "视频消息", id: "4" },
    ]
    if (json) {
        return arrayToJson(classList, "id")
    }
    return classList
}

// 群发状态
export const statusType = function(json = false) {
    const statusList = [       
        { name: '审核中', value: 1 },
        { name: '审核通过', value: 2 },
        { name: '审核未通过', value: 3 },
        { name: '已发送', value: 4 }
    ]
    if (json) {
        return arrayToJson(statusList, "value")
    }
    return statusList
}